<template>
  <div class="son">
    弟弟
    <div>弟弟的玩具: {{toy}}</div>
    <button @click="emitter.emit('send-toy', toy)">送给哥哥玩具</button>
  </div>
</template>

<script setup lang="ts">

  import emitter from "@/utils/emitter";
  import {ref} from "vue";

  const toy = ref<string>('奶龙');
</script>

<script lang="ts">
/**
 * @Author Rin_pu
 * @Date 2025/2/21 14:44
 * @Description son2
 * @todo
 */
export default {
  name: "son2.vue"
}
</script>

<style scoped>
.son {
  background-color: white;
  margin: auto;
  width: 80%;
  height: 40%;
}
</style>